#ifndef MTWIDGET_H
#define MTWIDGET_H

#include <QtGui>
#include "qtuiolistener.h"
class MTWidget : public QGraphicsPixmapItem
{


public:
    MTWidget( const QPixmap & pixmap, QGraphicsItem * parent = 0 );
    ~MTWidget();
    void onTouch(int touchId, double x, double y, int );
private:
    QMap<int,QPointF> touches;

    void rotateZoomMove(int touchId, QPointF pos);
    int findSecondTouch(int touchId);
    bool onTouchDown(int touchId, QPointF pos);
    bool onTouchUp(int touchId, QPointF pos);
    bool onTouchMove(int touchId, QPointF pos);
protected:
    void mouseMoveEvent( QGraphicsSceneMouseEvent * event);

};

#endif // MTWIDGET_H
